package com.example.oppotest.service;

import com.example.oppotest.entity.User;
import com.example.oppotest.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * @Author wyk
 * @Date: 2025/2/15 20:28
 */

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper ;

    public User selectUserByPhone(String mobileNo) {
        return userMapper.selectUserByPhone(mobileNo);
    }

    public User selectUser(Map<String, String> map) {
        return userMapper.selectUser(map);
    }

    public int insertUser(User user) {
        User newU = new User();
        newU.setPassWord(user.getPassWord());
        newU.setMobileNo(user.getMobileNo());
        return userMapper.insertUser(newU) ;
    }

}
